<template>
  <div class="table-container">
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column prop="deptName" label="单位" min-width="80" align="center"></el-table-column>
      <el-table-column prop="examName" label="考试名称" min-width="80" align="center"></el-table-column>
      <el-table-column  label="考试时间" min-width="80" align="center">
        <template slot-scope="scope">
          {{ scope.row.startTime.substring(0,scope.row.startTime.indexOf('.')).replace('T',' ') }} <br /> {{ scope.row.endTime.substring(0,scope.row.endTime.indexOf('.')).replace('T',' ') }}
        </template>
      </el-table-column>
      <el-table-column prop="examNumber" label="考试人员总数" min-width="80" align="center"></el-table-column>
      <el-table-column prop="answeredNumber" label="达标人数" min-width="80" align="center"></el-table-column>
      <el-table-column prop="notAnswered" label="未达标人数" min-width="80" align="center"></el-table-column>
      <el-table-column prop="topThree" label="前三名" min-width="80" align="center">
        <template slot-scope="scope">
          <div v-html="scope.row.topThree"></div>
        </template>
      </el-table-column>
      <el-table-column prop="lastThree" label="后三名" min-width="80" align="center">
        <template slot-scope="scope">
          <div v-html="scope.row.lastThree"></div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "examStatusTable",
  props: {
    tableData: {
      type: Array,
      default: () => [],
    },
  },
};
</script>

<style lang="scss" scoped></style>
